package com.leoman.dao;

import com.leoman.entity.PostImage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 帖子图片
 * Created by Administrator on 2016/10/18 0018 下午 3:03.
 */
public interface PostImageDao extends JpaRepository<PostImage, Integer>, JpaSpecificationExecutor<PostImage> {

    @Query("select a from PostImage a where a.post.id = ?1")
    List<PostImage> findListByPostId(Integer postId);
}